<template>
  <div class="answer_dialog_pass_container">
    <el-dialog title="" :visible.sync="show" center>
      <div class="success-tips-img" :style="honorImgById(dialogPassHonorId)"></div>
      <div class='success-tips-content-title'>恭喜你</div>
      <div class='success-tips-content'>获得了{{dialogPassHonorName}}勋章</div>
      <span slot="footer" class="dialog-footer">
         <el-button class="success-tips-btn" type="primary" @click="show = false">确认</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
var vm;
export default {
  components: {},
  data: function() {
    return {
      show: this.dialogPassShow,
      dialogPassHonorId: "1",
      dialogPassHonorName: "",
    }
  },
  methods: {
    honorImgById: function(id) {
      return { backgroundImage: 'url(' + require('../../../assets/img/answer_system/level_' + id + '.png') + ')' };
    },
    init: function(honorId, honorName) {
      this.show = true;
      this.dialogPassHonorId = honorId;
      this.dialogPassHonorName = honorName;
    },
    closeDialog: function() {
      this.show = false;
    }
  },
  updated: function() {


  },
  mounted: function() {

  },
  created: function() {
    vm = this;
  }
}

</script>
<style lang="scss">
.answer_dialog_pass_container {
  .el-dialog {
    background: transparent;
    background-image: url(../../../assets/img/answer_system/chuangguan_tip_bg.png);
    background-size: 100% 100%;
    width: 4.66rem;
    height: 5.59rem;
    border: none;
    box-shadow: none;
  }

  .el-dialog__headerbtn {
    display: none;
  }

  .el-dialog__footer {
    margin-top: 0.5rem;
  }
}

</style>
<style scoped>
.answer_dialog_pass_container {
  /*  background-color: #f3f6fb;
  min-height: 100%;*/
}

.success-tips-img {
  position: relative;
  width: 1.41rem;
  height: 1.37rem;
  background-image: url(../../../assets/img/answer_system/level_1.png);
  background-size: 89% 89%;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0 auto;
  top: 0.38rem;
}

.success-tips-content-title {
  position: relative;
  margin: 0 auto;
  top: 1.3rem;
  font-size: 0.4rem;
  text-align: center;
  color: #ff7901;
  letter-spacing: 0.1rem;
}

.success-tips-content {
  position: relative;
  font-size: 0.22rem;
  margin: auto 0;
  text-align: center;
  line-height: 0.5rem;
  top: 1.4rem;
  color: #666666;
  letter-spacing: 0.05rem;
}

.success-tips-btn {
  position: relative;
  width: 2.52rem;
  height: 0.52rem;
  margin: 0 auto;
  display: block;
  top: 0.7rem;
  font-size: 0.22rem;
  color: white;
  background-color: #3885f8;
  box-shadow: 0rem 0rem 0.25rem -0.05rem #3885f8;
  border-radius: 0.5rem;

}

</style>
